<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" >
<head th:replace="common/head :: head"></head>
<style>
  .layui-form-select dl { max-height:200px; }
</style>
<body>

<div th:replace="common/header :: header"></div>

<div class="layui-container fly-marginTop">
  <div class="fly-panel" pad20 style="padding-top: 5px;">
    <!--<div class="fly-none">没有权限</div>-->
    <div class="layui-form layui-form-pane">
      <div class="layui-tab layui-tab-brief" lay-filter="user">
        <ul class="layui-tab-title">
          <li class="layui-this">修改帖子</li>
        </ul>
        <div class="layui-form layui-tab-content" id="LAY_ucm" style="padding: 20px 0;">
          <div class="layui-tab-item layui-show">
            <form method="post">
              <div class="layui-row layui-col-space15 layui-form-item">
                <div class="layui-col-md3">
                  <label class="layui-form-label">所在专栏</label>
                  <div class="layui-input-block">
                    <select disabled lay-verify="required" name="columnType" lay-filter="column">
                      <option></option>
                      <option th:each="columnType : ${columnTypes}"
                              th:value="${columnType.name()}"
                              th:text="${columnType.describe}"
                              th:if="${#authorization.expression('hasAnyRole(#vars.columnType.roles)')}"
                              th:selected="${jie.columnType == columnType}"
                      >提问</option>
                    </select>
                  </div>
                </div>
                <div class="layui-col-md3">
                  <label class="layui-form-label">技术类型</label>
                  <div class="layui-input-block">
                    <select disabled lay-verify="required" name="technologyType" lay-filter="column">
                      <option></option>
                      <option th:each="technologyType,iterStat : ${technologyTypes}"
                              th:value="${technologyType.name()}"
                              th:text="${technologyType.describe}"
                              th:if="${iterStat.index != 0}"
                              th:selected="${jie.technologyType == technologyType}"
                      >JAVA</option>
                    </select>
                  </div>
                </div>
                <div class="layui-col-md6">
                  <label for="L_title" class="layui-form-label">标题</label>
                  <div class="layui-input-block">
                    <input type="text" id="L_title" name="jieTitle" disabled th:value="${jie.jieTitle}"  lay-verify="required|title" autocomplete="off" class="layui-input">
                  </div>
                </div>
              </div>

              <div class="layui-form-item layui-form-text">
                <div class="layui-input-block">
                  <textarea id="L_content" th:text="${jie.jieContent}" name="jieContent" required lay-verify="required" placeholder="详细描述" class="layui-textarea fly-editor" style="height: 260px;"></textarea>
                </div>
              </div>
              <div class="layui-form-item">
                <div class="layui-inline">
                  <label class="layui-form-label">悬赏</label>
                  <div class="layui-input-inline" style="width: 190px;">
                    <select disabled name="rewardValue">
                      <option th:each="rewardvalue : ${rewardValues}"
                              th:value="${rewardvalue.name()}"
                              th:text="${rewardvalue.describe+'元气'}"
                              th:selected="${jie.rewardValue == rewardvalue}"
                      >20元气</option>
                    </select>
                  </div>
                  <div class="layui-form-mid layui-word-aux">发表后无法更改悬赏</div>
                </div>
              </div>
              <div class="layui-form-item">
                <label for="L_vercode" class="layui-form-label">验证码</label>
                <div class="layui-input-inline">
                  <input type="text" id="L_vercode" name="verCode" required lay-verify="required" placeholder="请回答后面的问题" autocomplete="off" class="layui-input">
                </div>
                <div class="layui-form-mid">
                  <img th:src="@{/user/images/captcha.png}"  class="fly-imagecode">
                </div>
              </div>
              <div class="layui-form-item">
                <input type="hidden" name="id" th:value="${jie.jieId}">
                <button class="layui-btn" lay-filter="*" flush-imagecode="1" alert="1" lay-submit>立即发布</button>
              </div>
            </form>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

<div th:replace="common/footer :: footer"></div>
<script th:replace="common/common-js :: js"></script>
<script th:inline="javascript" >
  layui.config({
    base: '/res/mods/'
  }).extend({
    fly: 'index'
  }).use(['fly','jie']);
</script>
</body>
</html>